namespace SolidMvvm {
	using System;
	using System.Globalization;
	using System.Windows.Data;

	// Return NaN for true or 0 for false (ie. Show column for true, hide column for false.).
	[ValueConversion(typeof(bool), typeof(double))]
	public class TrueToPositiveInfinityAndFalseToZeroConverter : IValueConverter {
		public object Convert(object value, Type targetType, object parameter, CultureInfo culture) {
			return (bool)value ? double.PositiveInfinity : 0D;
		}

		public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture) {
			throw new NotImplementedException();
		}
	}
}
